* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 10px;
}

.stats {
    color: #666;
    font-size: 14px;
}

.controls {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

#searchInput {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

button:hover {
    background: #5a67d8;
}

#clearBtn {
    background: #ef4444;
}

#clearBtn:hover {
    background: #dc2626;
}

.filters {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.filters input[type="number"],
.filters select {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    height: calc(100vh - 200px);
}

.sidebar,
.info-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar h3,
.info-panel h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.search-results,
.top-nodes {
    margin-top: 10px;
}

.node-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #f7f7f7;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 13px;
}

.node-item:hover {
    background: #e0e0e0;
}

.node-item .node-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.node-item .node-stats {
    color: #666;
    font-size: 12px;
}

.graph-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

#graph {
    width: 100%;
    height: 100%;
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    min-width: 200px;
}

.legend h4 {
    margin-bottom: 10px;
    color: #333;
}

.legend div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-item {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.legend-edge {
    width: 30px;
    height: 3px;
    display: inline-block;
    margin-right: 5px;
}

#nodeInfo {
    font-size: 14px;
    color: #666;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 15px;
}

.info-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.info-list li {
    padding: 5px;
    background: #f7f7f7;
    margin-bottom: 5px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    background: #667eea;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}